import React, { Component, lazy, Suspense } from 'react';
import { Switch,Route,Redirect } from "react-router-dom";
// import 'antd/dist/reset.css';
import "./App.css"

var HIndex = lazy(()=>import('./views/Hindex'))
var Login = lazy(()=>import('./views/Login'))
var Register = lazy(()=>import('./views/Register'))
var Address = lazy(()=>import('./views/Address'))
var Detail = lazy(()=>import('./views/Detail'))


class App extends Component {


  render() {
  
    console.log(999);
    
    return (
      <div className='app'>
        <Suspense>
            <Switch>
              <Route path="/index" component={HIndex}/>
              <Route path="/login" component={Login}/>
              <Route path="/register" component={Register}/>
              <Route path="/address" component={Address}/>
              <Route path="/detail/:proid" component={Detail}/>
              <Redirect exact from='/' to="/index" />
            </Switch>
        </Suspense>
       

      </div>
    )
  }
}

export default App;
